<template>
  <div id="app">

    <navigation>
      <template v-slot:goBack >
        <img src="./assets/navigation/back.png" @click="onClickBack">
      </template>
      <template v-slot:nav-title>
        
      </template>
      <template v-slot:right>
        <img src="./assets/navigation/right.png">
      </template>  
    </navigation>

      <router-view></router-view>  

    <tabbar>
        <tabbarItem path="/">
          <template v-slot:img>
            <img src="./assets/tabbar/home1.png">
          </template>
          <template v-slot:img-active>
            <img src="./assets/tabbar/home2.png">
          </template>
          <template v-slot:title>
            首页
          </template>
        </tabbarItem>

        <tabbarItem path="/cate">
          <template v-slot:img>
            <img src="./assets/tabbar/cate1.png">
          </template>
          <template  v-slot:img-active>
            <img src="./assets/tabbar/cate2.png">
          </template>
          <template v-slot:title>
            分类
          </template>
        </tabbarItem>

        <tabbarItem path="/car">
          <template v-slot:img>
            <img src="./assets/tabbar/car1.png">
          </template>
          <template v-slot:img-active>
            <img src="./assets/tabbar/car2.png">
          </template>
          <template v-slot:title>
            购物车
          </template>
        </tabbarItem>

        <tabbarItem path="/mine">
          <template v-slot:img>
            <img src="./assets/tabbar/mine1.png">
          </template>
          <template v-slot:img-active>
            <img src="./assets/tabbar/mine2.png">
          </template>
          <template v-slot:title>
            个人
          </template>
        </tabbarItem>
    </tabbar>

  </div>
</template>
<script>
import tabbar from './components/tabbar/Tabbar';
import tabbarItem from './components/tabbar/TabbarItem';
import navigation from './components/nav/navigation';

export default {
  components:{
    tabbar,
    tabbarItem,
    navigation,
  },
  methods:{
    onClickBack(){
      window.history.go(-1);
      // console.log(window.history)
    }
  }
}
</script>
<style>
*{
  margin:0;
  padding:0;
}
#id{
  width:100%;
  height:100%;
}
</style>
